﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebRole1
{
	public partial class Logout : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			Response.Cookies["ForumSettings"].Expires = System.DateTime.Now.AddDays(-1);

			Response.Redirect("default.aspx");



			//if (Request.Cookies["ForumSettings"] != null)
			//{
			//   HttpCookie myCookie = new HttpCookie("ForumSettings");
			//   myCookie.Expires = DateTime.Now.AddDays(-1d);
			//   Response.Cookies.Add(myCookie);
			//}

			//Response.Cookies["ForumSettings"].Expires = System.DateTime.Now.AddDays(-1);
			//Response.Cookies["ForumSettings"]["UserID"] = null;

			//Request.Cookies["ForumSettings"].Expires = System.DateTime.Now.AddDays(-1);
			//Request.Cookies["ForumSettings"]["UserID"] = null;

			//HttpCookieCollection cookieCols = new HttpCookieCollection();
			//cookieCols = Request.Cookies;
			//Request.Cookies.Remove("ForumSettings");


			//if (Request.Cookies["ForumSettings"] != null)
			//{
			//   HttpCookie myCookie = new HttpCookie("ForumSettings");
			//   myCookie.Expires = DateTime.Now.AddDays(-1d);
			//   Response.Cookies.Add(myCookie);
			//}
		}
	}
}